export const getItem = data => {
    try {
        return JSON.parse(localStorage.getItem(data))
    } catch (error) {
        return data
    }
}

export const setItem = (name,data) => {
    try {
        localStorage.setItem(name,JSON.stringify(data))
    } catch (error) {
        localStorage.setItem(name,JSON.data)
    }
}